
 class Zoo {
    private final ArrayList<Animal> animals;

    public Zoo() {
        animals = new ArrayList<>();
    }

    public void addAnimal(Animal animal) {
        animals.add(animal);
    }

    public void letAnimalsMakeSound() {
        System.out.println("动物们开始发出声音：");
        for (Animal animal : animals) {
            animal.sound();
        }
    }

    public void letAnimalsMove() {
        System.out.println("\n动物们开始移动：");
        for (Animal animal : animals) {
            animal.move();
        }
    }
}
